<template>
	<view>
		<view class="content">
			<cpns-life-cycle v-if="isDestroy"></cpns-life-cycle>
		</view>
		<button @click="isDestroy = !isDestroy" type="warn">切换显示组件</button>
	</view>
</template>

<script>
	import cpnsLifeCycle from '../../components/cpns-life-cycle/cpns-life-cycle.vue'
	export default {
		components: {
			cpnsLifeCycle
		},
		data() {
			return {
				isDestroy: true
			}
		},
	}
</script>

<style>
.content {
	border: 4rpx solid red;
}
</style>
